﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BLL.Services.Magazines.Listing;

namespace BLL.Services.Magazines
{
    public class MagazinesService : IMagazinesService
    {
        private readonly MagazineCollection _magazineCollection;

        public MagazinesService(MagazineCollection magazineCollection)
        {
            _magazineCollection = magazineCollection;
        }

        public void Create(Magazine magazine)
        {
            _magazineCollection.Create(magazine);
        }

        public void Save(Magazine magazine)
        {
            _magazineCollection.Save(magazine);
        }

        public void Delete(int magazineId)
        {
            _magazineCollection.Delete(magazineId);
        }

        public Magazine GetMagazineById(int magazineId)
        {
            return _magazineCollection.GetMagazineById(magazineId);
        }

        public MagazinesListing Listing(int page, int size, string column, int direction, MagazinesFilter filter)
        {
            return _magazineCollection.Listing(page, size, column, direction, filter);
        }
    }
}
